package com.zhuiyun.project.api.headportrait.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @ClassName SysHeadPortrait
 * @Description TODO
 * @Author XMY
 * @Date 2023/12/11 14:36
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Table(name = "sys_head_portrait")
public class SysHeadPortrait {
    /**
     * 主键ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer portraitId;
    /**
     * 头像
     */
    private String portraitName;
    /**
     * 大小
     */
    private Long portraitSize;
    /**
     * 后缀名
     */
    private String portraitType;
    /**
     * 路径
     */
    private String portraitUrl;
    /**
     * 创建时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss" )//DateTimeFormat 是入参格式化；
    private Date createTime;
    /**
     * 回显id
     */
    private Integer picId;

}
